package com.project.common;

/**
 * ClassName: BaseContext
 * Package: com.project.common
 * Description:   线程获取userId值
 *
 * @Author 看到风
 * @Create 2023/10/21 23:02
 * @Version 1.0
 */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();

    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }

    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
